Skip to content

Conversation

Cristib05
Copy link
Contributor

This commit enhances DNS upstream resolver functionality by adding support to query for PTR and SRV records.

Testing has been done using the following configuration and bind9:
image

On an OpenThread node:
image

For SRV queries I haven't yet managed to see it working so far, not even using net dns command.

rlubos
rlubos previously approved these changes Oct 16, 2025
…ords

This commit enhances DNS upstream resolver functionality by adding
support to query for PTR and SRV records.

Signed-off-by: Cristian Bulacu <[email protected]>
@Cristib05
Copy link
Contributor Author

forgot a break statement.

@Cristib05 Cristib05 requested a review from rlubos October 16, 2025 13:35
@sonarqubecloud
Copy link

@Cristib05
Copy link
Contributor Author

Cristib05 commented Oct 16, 2025

@ckhardin, could you please let me know what might be wrong in
image
For example, using host I can obtain data:
host -t SRV testservice._http._tcp.example.com 2a02:2f01:7c05:c000:5da1:9be3:1a3d:81c9
Using domain server:
Name: 2a02:2f01:....
Address: 2a02:2f01:.....
Aliases:

testservice._http._tcp.example.com has SRV record 0 5 8080 dns1.example.com.

@ckhardin
Copy link
Contributor

ckhardin commented Oct 16, 2025

@ckhardin, could you please let me know what might be wrong in image For example, using host I can obtain data: host -t SRV testservice._http._tcp.example.com 2a02:2f01:7c05:c000:5da1:9be3:1a3d:81c9 Using domain server: Name: 2a02:2f01:.... Address: 2a02:2f01:..... Aliases:

testservice._http._tcp.example.com has SRV record 0 5 8080 dns1.example.com.

Take a packet capture and ensure that the wire sees the query and the response - compare those to the reference host code - if the packets are there, then the issue is likely in the parsing code for the message. There is nothing in the example that stands out as incorrect so this is likely a trace thru some code to figure out the parsing issues.

Also double check the configuration for DNS in the zephyr config and try to make sure all the length and sizes are set larger than the responses coming back. A trade off with zephyr for memory and code size is that the DNS configuration can be limited to messages it can handle in response and that can have unintended consequences.

@Cristib05
Copy link
Contributor Author

@ckhardin, could you please let me know what might be wrong in image For example, using host I can obtain data: host -t SRV testservice._http._tcp.example.com 2a02:2f01:7c05:c000:5da1:9be3:1a3d:81c9 Using domain server: Name: 2a02:2f01:.... Address: 2a02:2f01:..... Aliases:
testservice._http._tcp.example.com has SRV record 0 5 8080 dns1.example.com.

Take a packet capture and ensure that the wire sees the query and the response - compare those to the reference host code - if the packets are there, then the issue is likely in the parsing code for the message. There is nothing in the example that stands out as incorrect so this is likely a trace thru some code to figure out the parsing issues.

Also double check the configuration for DNS in the zephyr config and try to make sure all the length and sizes are set larger than the responses coming back. A trade off with zephyr for memory and code size is that the DNS configuration can be limited to messages it can handle in response and that can have unintended consequences.

Thanks. I'll keep you updated when I'll have an answer.

@nashif nashif merged commit 7503b31 into zephyrproject-rtos:main Oct 20, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants